package Com.amit.corejava;

class A
{
	 A getm1()
	 {
		 System.out.println("Welcome to covarient type");
		return this;
	 }
}

public class Lab38  extends A{
	
   Lab38 getm1()
   {
	   System.out.println("welcome to covarient type");
	return this;
   }
   
   public void n()
   {
	   System.out.println("n() is called");
   }

	public static void main(String[] args) {
		
		new Lab38().getm1().n();
	
		
	}

}
